package com.ss.android.download.a;

public final class c implements Cloneable {
    public long[] a;
    public long[] b;
    public int c;

    public c() {
        this((byte) 0);
    }

    private c(byte arg3) {

        int v0 = android.support.design.a.f(10);
        this.a = new long[v0];
        this.b = new long[v0];
        this.c = 0;
    }

    private c a() {
        try {
            c cVar = (c) super.clone();
            cVar.a = this.a.clone();
            cVar.b = this.b.clone();
            return cVar;
        } catch (CloneNotSupportedException e2) {
            return null;
        }

    }

    public final long a(long arg4) {
        int v0 = android.support.design.a.a(this.a, this.c, arg4);
        long v0_1 = v0 < 0 ? 0 : this.b[v0];
        return v0_1;
    }

    public final void a(long arg8, long arg10) {
        int v0 = android.support.design.a.a(this.a, this.c, arg8);
        if (v0 >= 0) {
            this.b[v0] = arg10;
        } else {
            v0 ^= -1;
            if (this.c >= this.a.length) {
                int v1 = android.support.design.a.f(this.c + 1);
                long[] v2 = new long[v1];
                long[] v1_1 = new long[v1];
                System.arraycopy(this.a, 0, v2, 0, this.a.length);
                System.arraycopy(this.b, 0, v1_1, 0, this.b.length);
                this.a = v2;
                this.b = v1_1;
            }

            if (this.c - v0 != 0) {
                System.arraycopy(this.a, v0, this.a, v0 + 1, this.c - v0);
                System.arraycopy(this.b, v0, this.b, v0 + 1, this.c - v0);
            }

            this.a[v0] = arg8;
            this.b[v0] = arg10;
            ++this.c;
        }
    }

    public final void b(long arg8) {
        int v0 = android.support.design.a.a(this.a, this.c, arg8);
        if (v0 >= 0) {
            System.arraycopy(this.a, v0 + 1, this.a, v0, this.c - (v0 + 1));
            System.arraycopy(this.b, v0 + 1, this.b, v0, this.c - (v0 + 1));
            --this.c;
        }
    }

    public final Object clone() throws CloneNotSupportedException {
        return this.a();
    }

    public final String toString() {
        String v0;
        if (this.c <= 0) {
            v0 = "{}";
        } else {
            StringBuilder v1 = new StringBuilder(this.c * 28);
            v1.append('{');
            int v0_1;
            for (v0_1 = 0; v0_1 < this.c; ++v0_1) {
                if (v0_1 > 0) {
                    v1.append(", ");
                }

                v1.append(this.a[v0_1]);
                v1.append('=');
                v1.append(this.b[v0_1]);
            }

            v1.append('}');
            v0 = v1.toString();
        }

        return v0;
    }
}

